<?php
/* 
	[BuyPg] (C) 2010-2011 Buypg
	$Id: ClassFModel.class.php 2011-4-18 10:27:50 wufujun $
 */

if (!defined('THINK_PATH')){
	exit('Access Denied');
}

class ClassFModel extends Model{

	//获取当前分类分数
	public function  getClassF($classid){
		$result = $this->where('class_id = '.$classid)->find();
		//格式化f1到f7的数据
		for ($i = 1; $i < 8 ; $i++){
			$result['f'.$i.'_avg_imgheight'] = $result['f'.$i.'_avg'];
			$result['f'.$i.'_avg'] = formatFen($result['f'.$i.'_avg']);
			$result['f'.$i.'_max_imgheight'] = $result['f'.$i.'_max'];
			$result['f'.$i.'_max'] = formatFen($result['f'.$i.'_max']);
			$result['f'.$i.'_min_imgheight'] = $result['f'.$i.'_min'];
			$result['f'.$i.'_min'] = formatFen($result['f'.$i.'_min']);
		}
		return $result;
	}
}
?>
